package com.learn.spring.boot.config.springbootconfig.event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;

public class NotifyListener implements ApplicationListener<NotifyEvent> {

    private static final Logger logger = LoggerFactory.getLogger(NotifyListener.class);


    @Override
    public void onApplicationEvent(NotifyEvent notifyEvent) {
        logger.info("邮件地址：" + notifyEvent.getEmail());
        logger.info("邮件内容：" + notifyEvent.getContent());
    }
}
